package online.qiujing.proxy.dynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * describe:动态代理类
 *
 * @author 的川
 * @date 2019/02/21
 */
public class DynProxyLawyer implements InvocationHandler{


    private Object target;

    public DynProxyLawyer(Object obj){
        target = obj;
    }


    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        System.out.println("案件进展："+method.getName());
        Object result=method.invoke(target,args);
        return result;
    }
}
